/*
** raw_mode.c for alum1 in /home/nadali_t//local/Projets/CprgElem/alum1
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Mon Feb  6 15:45:11 2012 thomas nadalie
** Last update Mon Feb  6 16:23:06 2012 thomas nadalie
*/

#include	"my.h"

void    raw_mode(struct termios *t)
{
  if (tcgetattr(0, t) == -1)
    {
      printf("tcgetattr failed\n");
      exit(1);
    }
  t->c_lflag &= ~ICANON;
  t->c_cc[VMIN] = 1;
  t->c_cc[VTIME] = 0;
  if (tcsetattr(0, TCSANOW, t) == -1)
    {
      printf("tcsetattr failed\n");
      exit(1);
    }
}
